<!DOCTYPE html>
<!–suppress ThymeleafVariablesResolveInspection –>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="登录"></title>
    <script th:src="@{'/js/jquery/3.3.1/jquery.js'}"></script>
    <link th:href="@{/css/leftMenu/index.css}" rel="stylesheet"/>
</head>
<script th:inline="javascript">

    function openMainFrame(url){
        parent.openMainFrame(url);
    }



</script>

<body style="background-color: #eeeeee">
    <div id="leftMenu">
        <dl class="list_dl">
            <th:block th:each="permission:${permissionList}">
                <th:block th:if="${session.permissionStrList.contains(permission.permissionStr) && permission.children.size() le 0}">
                    <dt class="list_dt" th:onclick="'javascript:openMainFrame(\''+${permission.url}+'\')'" >
                        <span class="_after"></span>
                        <p th:text="${permission.permissionName}">选择器</p>
                    </dt>
                    <dd class="list_dd">

                    </dd>
                </th:block>
                <th:block th:if="${session.permissionStrList.contains(permission.permissionStr) && permission.children.size() gt 0}">
                    <dt class="list_dt" >
                        <span class="_after"></span>
                        <p th:if="${session.permissionStrList.contains(permission.permissionStr)}" th:text="${permission.permissionName}">选择器</p>
                        <i class="list_dt_icon"></i>
                    </dt>
                    <dd class="list_dd">
                        <ul >
                            <li class="list_li" th:each="permission1:${permission.children}" th:if="${session.permissionStrList.contains(permission1.permissionStr)}" ><span th:text="${permission1.permissionName}" th:onclick="'javascript:openMainFrame(\''+${permission1.url}+'\')'"></span></li>
                        </ul>
                    </dd>
                </th:block>
            </th:block>
        </dl>
    </div>

</body>
<script type="text/javascript">
    $(".list_dt").on("click",function () {
        $('.list_dd').stop();
        $(this).siblings("dt").removeAttr("id");
        if($(this).attr("id")=="open"){
            $(this).removeAttr("id").siblings("dd").slideUp();
        }else{
            $(this).attr("id","open").next().slideDown().siblings("dd").slideUp();
        }
    });
</script>


</html>